package mall.service;

import java.util.List;

import mall.dao.OrderDAO;
import mall.pojo.Orders;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class OrderServiceImpl implements OrderService {

	@Autowired
	private OrderDAO orderDAO;

	@Transactional
	@Override
	public void createOrder(Orders orders) {
		orderDAO.createOrder(orders);
	}

	@Transactional
	@Override
	public List<Orders> getOrderShop(int shopId) {
		return orderDAO.getOrderShop(shopId);
	}

	@Transactional
	@Override
	public Orders getOrder(int orderId) {
		return orderDAO.getOrder(orderId);
	}

	@Transactional
	@Override
	public int updateOrder(Orders orders) {
		return orderDAO.updateOrder(orders);
	}
	
}
